<template>
  <a-row class="mb-5" justify="space-between">
    <a-col :span="5" v-for="(item, index) in datas.listTable">
      <div class="content">
        <div class="content-top">
          <div class="content-title">{{item.title}} <span class="content-v">></span></div>
          <img class="content-icon" src="../../../assets/image//hone_1.png" alt="">
        </div>
        <div class="content-charts">
          <BarEcharts :ids="item.color"/>
        </div>
        <div class="content-total">
          <div>今日受理: <span>800</span></div>
          <div>本月受理: <span>88</span></div>
        </div>
        <div class="content-nototal">
          <div>累计未结量: <span>666</span></div>
        </div>
      </div>
    </a-col>
  </a-row>
</template>

<script lang="ts" setup>
import { reactive } from 'vue';
import image1 from '../../../assets/image/hone_1.png';
import image2 from '../../../assets/image/hone_2.png';
import image3 from '../../../assets/image/hone_3.png';
import image4 from '../../../assets/image/hone_4.png';
import BarEcharts from './BarEcharts.vue';

const datas = reactive({
  listTable: [
    {
      title: '新契约受理',
      subtitle: '年',
      number: 5670,
      color: 'red',
      key: 'Name',
      dataIndex: '较昨日',
      img: image1,
    },
    {
      title: '保全受理',
      subtitle: '月',
      number: 5670,
      color: 'orangered',
      key: 'Name',
      dataIndex: '较昨日',
      img: image2,
    },
    {
      title: '理赔受理',
      subtitle: '日',
      number: 5670,
      color: 'orange',
      key: 'Name',
      dataIndex: '较昨日',
      img: image3,
    },
    {
      title: '柜面服务',
      subtitle: '时',
      number: 5670,
      color: 'lime',
      key: 'Name',
      dataIndex: '较昨日',
      img: image4,
    },
  ],
});
</script>

<style lang="scss" scoped>
.content {
  background-color: #faf0ee;
  padding: 10px;
  border-radius: 10px;
  box-shadow: 0px 15px 2px #dddbdb;
  .content-top {
    display: flex;
    justify-content: space-between;
    .content-title {
      font-size: 14px;
    }
    .content-v {
      color: #91231a;
    }
    .content-icon {
      width: 30px;
      height: 30px
    }
  }
  .content-total {
    background-color: #fdf8f7;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    padding: 10px 20px;
    font-size: 14px;
    margin-top: 14px;
    span {
      color: #fc869c;
    }
  }
  .content-nototal {
    background-color: #fdf8f7;
    border-radius: 10px;
    text-align: center;
    padding: 10px 20px;
    font-size: 14px;
    margin-top: 14px;
    span {
      color: #fc869c;
    }
  }
}
</style>